/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.service;

import com.alibaba.fastjson.JSONObject;
import me.zhengjie.business.domain.Qy;
import me.zhengjie.business.domain.vo.DqyVo;
import me.zhengjie.business.domain.vo.QyHomeJyVO;
import me.zhengjie.business.service.dto.QyDto;
import me.zhengjie.business.service.dto.QyQueryCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author xiahongbo
* @date 2022-07-14
**/
public interface QyService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(QyQueryCriteria criteria, Pageable pageable);

    /**
     * 查询数据分页
     * @param hilgId 条件
     * @param zt 条件
     * @param blurry 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String,Object> queryList(String hilgId, String zt, String blurry, String area, Pageable pageable);
    Map<String,Object> queryAllQyList(String hljgId, String zt, String blurry, Pageable pageable);

    Page<Qy> queryIncompleteList(String blurry, Pageable pageable);

    /**
     * 移动端查询数据分页
     * @param blurry 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Page<Qy> queryMpList(QyQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<QyDto>
    */
    List<QyDto> queryAll(QyQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param bisQyId ID
     * @return QyDto
     */
    QyDto findById(String bisQyId);

    /**
    * 创建
    * @param resources /
    * @return QyDto
    */
    QyDto create(Qy resources);

    @Transactional(rollbackFor = Exception.class)
    void sign(Qy resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(Qy resources);

    /**
     * 编辑
     * @param qyid /
     */
    void updateQyzfzt(String qyid);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(String[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<QyDto> all, HttpServletResponse response) throws IOException;

    JSONObject checkChooseHljg(Long zhid, String fwlx);

    Map<String, Object> qyHomeJY(QyQueryCriteria qyHomeJyVO,Pageable pageable);

    void qyHomeJYUpdate(HashMap<String, String> map) throws ParseException;

    Map<String, Object> qyHomeYjy(QyQueryCriteria qyHomeJyVO, Pageable pageable);

    void qyHomeCxjgUpdate(HashMap<String, String> qyHomeJyVO);

    String findByZhId(Long bisZhsqId);
}